# Creating a new Project Template

This endpoint returns structured Project Template objects.
As with all Kantata OX API endpoints, the returned data will be referenced in sorted order in the `results` array
and will be indexed by ID in the `project_templates` top-level JSON key.
Please see our [Response Format](#section/Response-Format) section for more information.

Endpoint: POST /project_templates
Version: 1.0.0

## Query parameters:

  - `include` (string)
    Any of the below associations can be included in your request by providing the `include` param, e.g. `include=association1,association2`.
- `project_template_additional_tabs` (ProjectTemplateAdditionalTab) - Retrieves the additional tabs added to the template. The response will include `project_template_additional_tab_ids`, which references the data in the `project_template_additional_tabs` top-level key.
- `project_template_assignments` (ProjectTemplateAssignment) - Project template assignments associated with the project template.
- `user` (User) - The user who created the project template (referenced by user_id).

  - `optional_fields` (array)
    Allows you to request one or more optional fields as an array.

## Request fields (application/json):

  - `project_template` (object)

  - `project_template.title` (string, required)
    The title of the project template.

  - `project_template.sharing` (string)
    The sharing setting for the template. Viewable and editable templates can be seen by users on the account other than the creator.
    Enum: "private_template", "viewable_template", "editable_template"

  - `project_template.is_budgeted` (boolean)
    The project template has financial attributes including overall budget, task budgets, and task time estimates.

  - `project_template.budget` (integer)
    The estimated overall budget of the project associated with the template.

  - `project_template.duration` (integer)
    The estimated number of days that the associated project will take.

  - `project_template.currency` (string, required)
    The currency of the project template.

  - `project_template.description` (string)
    A description of the project template which does not carry over to the project description when applied.

  - `project_template.raw_json` (string)
    A JSON hash that contains all project templates' tasks.

## Response 200:

  - `200` (unknown)
    Project Template has been created.

## Response 200 fields (application/json):

  - `count` (integer)

  - `meta` (object)

  - `meta.count` (integer)

  - `meta.page_count` (integer)

  - `meta.page_number` (integer)

  - `meta.page_size` (integer)

  - `results` (array)

  - `results.key` (string)

  - `results.id` (string)

  - `project_templates` (object)

  - `users` (object)

  - `project_template_assignments` (object)

  - `project_template_additional_tabs` (object)

## Response 400:

  - `400` (unknown)
    Bad Request

## Response 400 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 401:

  - `401` (unknown)
    Unauthorized request

## Response 401 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 403:

  - `403` (unknown)
    Forbidden request

## Response 403 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 404:

  - `404` (unknown)
    Page Not Found

## Response 404 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 422:

  - `422` (unknown)
    Unprocessable Entity

## Response 422 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

## Response 503:

  - `503` (unknown)
    Service is unavailable

## Response 503 fields (application/json):

  - `errors` (array)

  - `errors.type` (string)

  - `errors.message` (string)

